package com.laiat.yamba;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.laiat.yamba.activity.TimelineActivity;

public class TimelineReceiver extends BroadcastReceiver {
	
	private static final String TAG = TimelineActivity.class.getSimpleName();

	private TimelineActivity timelineActivity;
	
	public TimelineReceiver(TimelineActivity timelineActivity) {
		super();
		this.timelineActivity = timelineActivity;
	}



	@Override
	public void onReceive(Context content, Intent intent) {
		if (intent.getAction().equals(UpdaterService.BROADCAST_UPDATE_TIMELINE_ACTION_NAME)) {
			Log.d(TAG, "Received the timeline updater");
			timelineActivity.refreshListView();
		}
	}
}
